home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / bugdemo.pas < prev    next >
Pascal/Delphi Source File  |  1985-07-07  |  896b  |  33 lines

  1. {$P1024,G1024}
  2. {$C+,U+}
  3. Program BugDemo;            {Demonstrates a bug with Read and Readln}
  4.                              {When using standard i/o}
  5.                              {Try un-commenting the various lines in }
  6.                              { Hit_Return                           }
  7.                              {If you have any solutions, please post}
  8.                              {Them here, or call Met-Chem 203/281-7287}
  9. Var
  10.    Answer : Char;
  11.    Cycle  : Integer;
  12. Procedure Hit_Return;
  13.    Begin
  14.         Write('  Hit <Return> to continue.');
  15.         Read(Answer);
  16. {        Repeat Read(Answer) until answer <> #13; }
  17. {         Readln(Answer);}
  18.    End;
  19. Begin
  20.    For Cycle := 1 to 10 do begin
  21.        Write(Cycle);
  22.        Hit_Return;
  23.        Writeln;
  24.        end;
  25.  
  26. End.
  27.  
  28. d;
  29. Begin
  30.    For Cycle := 1 to 10 do begin
  31.        Write(Cycle);
  32.        Hit_Return;
  33.